var o, e = require, t = module, n = exports, i = this && this.__extends || (o = function(t, e) {
    return (o = Object.setPrototypeOf || {
        __proto__: []
    } instanceof Array && function(t, e) {
        t.__proto__ = e;
    } || function(t, e) {
        for (var n in e) e.hasOwnProperty(n) && (t[n] = e[n]);
    })(t, e);
}, function(t, e) {
    function n() {
        this.constructor = t;
    }
    o(t, e), t.prototype = null === e ? Object.create(e) : (n.prototype = e.prototype, 
    new n());
}), a = this && this.__decorate || function(t, e, n, o) {
    var i, a = arguments.length, r = a < 3 ? e : null === o ? o = Object.getOwnPropertyDescriptor(e, n) : o;
    if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, n, o); else for (var s = t.length - 1; 0 <= s; s--) (i = t[s]) && (r = (a < 3 ? i(r) : 3 < a ? i(e, n, r) : i(e, n)) || r);
    return 3 < a && r && Object.defineProperty(e, n, r), r;
};

Object.defineProperty(n, "__esModule", {
    value: !0
});

var r = e("Global"), s = e("PrefabView"), c = e("AudioManager"), l = e("MyButton"), d = e("GameConfig"), u = e("AdManager"), p = e("WebManager"), h = cc._decorator, f = h.ccclass, g = h.property, m = function(e) {
    function t() {
        var t = null !== e && e.apply(this, arguments) || this;
        return t.root = null, t.viewname = "", t.btnname = "", t.myButton = null, t;
    }
    return i(t, e), t.prototype.onDisable = function() {
        cc.systemEvent.off(this.text, this.callback, this), this.node.destroy();
    }, t.prototype.onClickBack = function() {
        c.default.getInstance().playAudio("按钮2"), this.pushEvent("返回"), this.closePnl();
    }, t.prototype.onEnable = function() {
        cc.tween(this.node).to(.1, {
            scale: 1.1
        }).to(.1, {
            scale: 1
        }).call(function() {}).start();
    }, t.prototype.start = function() {
        this.myButton && (this.myButton.tag = this.text, this.myButton.viewname = this.viewname, 
        this.myButton.btnname = this.btnname, this.myButton.init()), cc.systemEvent.on(this.text, this.callback, this), 
        this.init(), d.GC.isVaild(this.text + "_banner") || (r.G.isBanner(this.text) ? u.default.getInstance().showBanner(this.text) : GA.isWeChat() && r.G.isGuide(this.text));
    }, t.prototype.pushEvent = function(t) {
        p.default.getInstance().sentLog("点击" + this.viewname + "界面" + t + "按键");
    }, t.prototype.closePnl = function() {
        this.hidePnl(), u.default.getInstance().hideAllBanner();
    }, t.prototype.init = function() {}, t.prototype.callback = function() {}, a([ g ], t.prototype, "viewname", void 0), 
    a([ g ], t.prototype, "btnname", void 0), a([ g(l.default) ], t.prototype, "myButton", void 0), 
    a([ f ], t);
}(s.default);

n.default = m;